---
title: "Create BYOK Credential"
method: POST
path: "/byok"
tags: ["BYOK"]
---

# Create BYOK Credential

`POST /byok`

## Request

- Base URL: `https://synchronex.ai/api/v1`
- URL: `https://synchronex.ai/api/v1/byok`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://synchronex.ai/oauth/authorize`, token URL `https://synchronex.ai/api/oauth/token`, scopes: `read`)

Encrypts and stores a BYOK credential. Requires write scope and Pro or Managed tier.

## Request body

- object
  - `service` string, required
  - `label` string, required
  - `key` string, required

## Response `201`

Credential stored.

- object
  - `credential` ByokCredential
    - `id` string, uuid
    - `service` string
    - `label` string
    - `key_hint` string
    - `created_at` string, date-time
    - `last_used_at` string, date-time, nullable
  - `message` string

## Other responses

- `400`: Validation error. The request body or query string is invalid.
- `401`: Unauthorized. Missing, malformed, expired, or revoked bearer token.
- `403`: Forbidden. The token scope or account tier is insufficient.
- `409`: Conflict. The requested mutation conflicts with current state.
- `429`: Rate limit exceeded. Retry after the indicated reset time.
- `500`: Internal server error.

---

[API](https://skmtc.dev/synchronex/apis/synchronex-api.md) · [All operations](https://skmtc.dev/synchronex/apis/synchronex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/synchronex/apis/synchronex-api/revisions/aa1e0df0a8d5?raw)
