---
title: "Create API Key"
method: POST
path: "/v1/payors/{payorId}/applications/{applicationId}/keys"
tags: ["Payors"]
---

# Create API Key

`POST /v1/payors/{payorId}/applications/{applicationId}/keys`

## Request

- Base URL: `https://api.sandbox.velopayments.com`
- URL: `https://api.sandbox.velopayments.com/v1/payors/{payorId}/applications/{applicationId}/keys`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://api.sandbox.velopayments.com/v1/login`

Create an an API key for the given payor Id and application Id

You can create multiple API Keys for a given application

API Keys are programmatic users for integrating your application with the Velo platform

The response will return the API Key and the secret. This is the only time you will be able to see the secret

## Path parameters

- `payorId` string, uuid, required
- `applicationId` string, uuid, required

## Request body

- PayorCreateApiKeyRequest
  - `name` string, required: A name for the key.
  - `description` string, nullable: Description of the key.
  - `roles` string[], required: <p>A role to assign to the key.</p> <p>If you want your API key to have write access then assign the role velo.payor.admin</p> <p>A later version will change this property from a list to string</p>

## Response `200`

HTTP Ok, key created

- PayorCreateApiKeyResponse
  - `apiKey` string, uuid: API Key
  - `apiSecret` string, uuid: API Secret

## Other responses

- `400`: Invalid request. See Error message payload for details of failure
- `403`: The authentication does not have permissions to access the resource This usually occurs when there is a valid authentication instance (client or user) but they do not have the required permissions
- `404`: The resource was not found or is no longer available

## Changes

- **2023-10-10** `b924ba134e09`: 2 breaking, 2 info
  - removed the enum value `velo.payor.admin` of the request property `roles/items/`
  - removed the enum value `velo.payor.support` of the request property `roles/items/`
  - added the new `payor.admin` enum value to the request property `roles/items/`
  - added the new `payor.support` enum value to the request property `roles/items/`
- **2022-12-12** `3cf504795910`: 1 info
  - api operation id `payorCreateApiKeyRequest` removed and replaced with `payorCreateApiKeyV1`
- **2022-08-10** `1e7a1734a45c`: 2 breaking, 2 info
  - removed the enum value `payor.admin` of the request property `roles/items/`
  - removed the enum value `payor.support` of the request property `roles/items/`
  - added the new `velo.payor.admin` enum value to the request property `roles/items/`
  - added the new `velo.payor.support` enum value to the request property `roles/items/`
- **2020-10-30** `dd71433847a6`: 3 breaking, 18 info
  - the `errors/items/` response's property type changed from no type to `object` for status `400`
  - the `errors/items/` response's property type changed from no type to `object` for status `403`
  - the `errors/items/` response's property type changed from no type to `object` for status `404`
  - added the optional property `errors/items/errorCode` to the response with the `400` status
  - …17 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/velopaymentsapi/apis/velo-payments-apis/changes/v1/payors/:payorId/applications/:applicationId/keys/post.md)

---

[API](https://skmtc.dev/velopaymentsapi/apis/velo-payments-apis.md) - [All operations](https://skmtc.dev/velopaymentsapi/apis/velo-payments-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/velopaymentsapi/apis/velo-payments-apis/revisions/05c3f09fc50a?raw)
