# Issue access profile credential in organization

`POST /v1/organizations/{organization}/accessProfiles/{accessProfile}/credentials`, operation `accessProfiles.IssueAccessProfileCredentialInOrganization`

Issues a short-lived credential from an access profile, optionally narrowed by scope. Every issue is recorded in the Data Access audit log.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `organization` | path | Yes | `string` | The organization's ID. |
| `accessProfile` | path | Yes | `string` | The access profile's ID. |

## Request body

Content-Type: `application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `scope` | `map<string, object>` | No | Narrows the credential below the access profile's config, as its provider reads it; unset, the credential reaches all that the profile does. GitHub's: {"repositories": ["api"], "permissions": {"contents": "read"}}, either field of which may be left out. |

## Responses

### 200

OK

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `accessProfile` | `string` | Yes | Resource name of the access profile that issued this credential. |
| `credential` | `map<string, string>` | Yes | Short-lived credential fields. |
| `expireTime` | `string (date-time)` | Yes | When the credential expires. |
| `hint` | `string` | Yes | Guidance on what the credential reaches and how tools use it. |
| `provider` | `string` | Yes | Provider type, such as providers/github. |
| `scope` | `map<string, object>` | Yes | Effective scope reached by the credential. |

### default

Error

Base URL: `https://api.kosem.ai`. See [API conventions](https://docs.kosem.ai/reference/api-conventions.md) for authentication, pagination and errors, and [https://docs.kosem.ai/openapi.yaml](https://docs.kosem.ai/openapi.yaml) for the full OpenAPI document.