> ## Documentation Index
> Fetch the complete documentation index at: https://docs.capcells.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Supply a source credential

> Give the Platform the Tenancy's own standing with a Source.

The secret travels in this request body and nowhere else. The Platform holds it sealed, and no read answers it back.

## Who may call

An administrator of the organization, as a person. The agent is refused on live and sandbox Tenancies alike.

## Path parameters

**tenant\_id** `string` *required*

The Tenancy acting. It comes from [Read the tenancy](https://docs.capcells.com/api-reference/console/tenancy/read.md); your organization must be bound to it.

**source** `string` *required*

The catalogue's name for the Source, as [List the sources](https://docs.capcells.com/api-reference/sources/list.md) answers it.

## Body

**credential** `string` *required*

Your standing with the Source, in whatever shape its protocol gives it.

**expires\_at** `string`

When the Source's own credential stops working, as an RFC 3339 moment. Omitted, nothing is stated.

## Response

Answers `201`.

**id** `string` *required*

The credential's identifier.

**source** `string` *required*

The Source it is for.

**state** `string` *required*

Where the credential stands.

**expires\_at** `string`

When the Source's own credential stops working, as you stated it. Absent where you stated nothing.

**supplied\_by** `string` *required*

Who supplied it.

**supplied\_at** `string` *required*

When.

**revoked\_at** `string`

Present exactly on a withdrawn credential.

**revoked\_by** `string`

Who withdrew it.

**revoked\_reason** `string`

The reason given.

## Refusals

| Status | Code | When |
| - | - | - |
| `401` | `unauthenticated` | The token is missing or cannot be used |
| `403` | `not_permitted_tenant` | Your organization does not act for the Tenancy in the path |
| `403` | `not_permitted_role` | The caller is not an administrator |
| `403` | `not_permitted_actor` | The caller is the agent |
| `400` | `malformed_request` | The body has an unknown field, a field stated twice, or more than one JSON value |
| `415` | `unsupported_media_type` | The body is not declared `application/json` |
| `400` | `invalid_identifier` | The Source needs no credential |
| `404` | | The catalogue declares no such Source |

Every refusal carries the [error shape](https://docs.capcells.com/api-reference/overview.md#the-error-shape). `429` and `503` answer as at the signing door.

```bash Request theme={null}
curl -X POST https://api.capcells.com/console/v1/tenants/capyplazo/sources/$SOURCE/credentials \
  -H "Authorization: Bearer $CONSOLE_TOKEN" \
  -H "Content-Type: application/json" \
  -d @credential.json
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.