---
title: "POST /tyk/keys/{keyId}"
method: POST
path: "/tyk/keys/{keyId}"
---

# POST /tyk/keys/{keyId}

`POST /tyk/keys/{keyId}`

Add a pre-specified *API token* with the *session object* defined in the body, this operatin creates a custom token that dsoes not use the gateway naming convention for tokens

## Path parameters

- `keyId` string, required

## Headers

- `x-tyk-authorization` string, string, required

## Request body

- SessionObject
  - `allowance` number
  - `rate` number
  - `per` number
  - `expires` number
  - `quota_max` number
  - `quota_renews` number
  - `quota_remaining` number
  - `quota_renewal_rate` string
  - `access_rights` object
  - `org_id` string
  - `meta_data` object
  - `oauth_client_id` string
  - `basic_auth_data` object
    - `password` string
    - `hash_type` '' | 'bcrypt'
  - `jwt_data` object
    - `secret` string
  - `hmac_enabled` boolean
  - `hmac_string` string
  - `is_inactive` boolean
  - `apply_policy_id` string
  - `monitor` object
    - `trigger_limits` string[]
  - `tags` string[]

## Response `200`

Key Added Response

---

[API](https://skmtc.net/tyktechnologies/apis/gateway-rest-api.md) · [All operations](https://skmtc.net/tyktechnologies/apis/gateway-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tyktechnologies/gateway-rest-api/versions/de93b47616b5/schema)
