---
title: "Get API namespace"
method: POST
path: "/v2/apis.getApi"
tags: ["apis"]
---

# Get API namespace

`POST /v2/apis.getApi`

Retrieve basic information about an API namespace including its ID and name.

Use this to verify an API exists before performing operations, get the human-readable name when you only have the API ID, or confirm access to a specific namespace. For detailed key information, use the `listKeys` endpoint instead.

**Required Permissions**

Your root key must have one of the following permissions:
- `api.*.read_api` (to read any API)
- `api.<api_id>.read_api` (to read a specific API)

## Request body

- V2ApisGetApiRequestBody
  - `apiId` string, required — Specifies which API to retrieve by its unique identifier. Must be a valid API ID that begins with 'api_' and exists within your workspace.

## Response `200`

API information retrieved successfully. Contains the unique API ID and human-readable name.

- V2ApisGetApiResponseBody
  - `meta` Meta, required — Metadata object included in every API response. This provides context about the request and is essential for debugging, audit trails, and support inquiries. The `requestId` is particularly important when troubleshooting issues with the Unkey support team.
    - `requestId` string, required — A unique id for this request. Always include this ID when contacting support about a specific API request. This identifier allows Unkey's support team to trace the exact request through logs and diagnostic systems to provide faster assistance.
  - `data` V2ApisGetApiResponseData, required
    - `id` string, required — The unique identifier of this API within Unkey's system. Used in all operations related to this API including key creation, verification, and management. Always begins with 'api_' followed by alphanumeric characters and underscores. This identifier is permanent and never changes after API creation.
    - `name` string, required — The internal name of this API as specified during creation. Used for organization and identification within your workspace. Helps distinguish between different environments, services, or access tiers. Not visible to end users - this is purely for administrative purposes.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `429` — Too Many Requests
- `500` — Internal server error

---

[API](https://skmtc.net/unkeyed/apis/unkey-api.md) · [All operations](https://skmtc.net/unkeyed/apis/unkey-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unkeyed/unkey-api/revisions/4bd11a7252bc/schema)
