Create an API key
POST
/api/api-keys
curl --request POST \ --url https://api.sipstack.com/api/api-keys \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "CRM Integration", "environment": "production" }'import requests
url = "https://api.sipstack.com/api/api-keys"
payload = { "name": "CRM Integration", "environment": "production"}headers = { "Authorization": "Bearer <token>", "Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())const url = 'https://api.sipstack.com/api/api-keys';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"CRM Integration","environment":"production"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}import axios from 'axios';
const options = { method: 'POST', url: 'https://api.sipstack.com/api/api-keys', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, data: {name: 'CRM Integration', environment: 'production'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}Creates a new key. The full key value is returned only in this response — copy it immediately. Requires API access on your plan.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
name
required
string
Example
CRM Integration environment
string
Responses
Section titled “ Responses ”Key created — data.key is shown once.
Media type application/json
object
success
boolean
message
string
data
object
key
The full key — shown only here.
string
prefix
string
environment
string
name
string
Example
{ "data": { "key": "sk_live_..." }}Name missing or invalid environment.
Not an owner/admin, or API access not on your plan.