Invite employee
Sends a team invitation via email. Requires account owner key with team:manage permission.
POST /team/invitations
- Key Permission:
team:manage - Key: only live key sk_live (test key will get 403 test_key_cannot_buy)
- Idempotency-Key: required. Idempotency
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
email |
string | yes | Invitee's email. If this person is already on the team, a 409 error will occur. |
role |
string | no | Role: staff (default) or admin. The owner role cannot be assigned via API. |
Important to know
- Only a production key with
team:managerights created by the account owner can modify the team. Other keys receive 403 (owner_key_required,insufficient_scope,test_key_cannot_buy). - The
ownerrole cannot be assigned or removed via API; the owner cannot be removed. Ownership transfer is done in the dashboard. - Every action is logged in the account audit log and sent as notifications to owners and administrators.
- For team methods, the limit is stricter than the general one: no more than 20 requests per minute per account.
- Invitations are sent to the specified email; the link is valid for 7 days. If sending fails, the invitation is not created (503).
Request example
curl -X POST https://api.shippickup.com/v1/team/invitations \
-H "Authorization: Bearer $SHIPPICKUP_API_KEY" \
-H "Idempotency-Key: order-10452-label-v1" \
-H "Content-Type: application/json" \
-d '{
"email": "new.person@example.com",
"role": "staff"
}'<?php
$body = [
'email' => 'new.person@example.com',
'role' => 'staff',
];
$ch = curl_init('https://api.shippickup.com/v1/team/invitations');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('SHIPPICKUP_API_KEY'),
'Idempotency-Key: order-10452-label-v1',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode($body),
]);
$response = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
print_r([$status, $response]);
import os
import requests
body = {
"email": "new.person@example.com",
"role": "staff",
}
r = requests.post(
"https://api.shippickup.com/v1/team/invitations",
headers={
"Authorization": "Bearer " + os.environ["SHIPPICKUP_API_KEY"],
"Idempotency-Key": "order-10452-label-v1",
},
json=body,
timeout=30,
)
print(r.status_code, r.json())
const body = {
"email": "new.person@example.com",
"role": "staff"
};
const res = await fetch("https://api.shippickup.com/v1/team/invitations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SHIPPICKUP_API_KEY}`,
"Idempotency-Key": "order-10452-label-v1",
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});
console.log(res.status, await res.json());
Response example 201
JSON
{
"data": {
"id": "2f9b6d0c8e1a4573b4c2a9e6d8",
"email": "new.person@example.com",
"role": "staff",
"expires_at": "2026-12-11T10:15:30+00:00",
"created_at": "2026-12-04T10:15:30+00:00"
}
}Possible errors
| HTTP | Code | Description |
|---|---|---|
| 403 | test_key_cannot_buy | Test key does not purchase labels or order pickups, use a live key. |
| 403 | owner_key_required | Командой может управлять только ключ, созданный владельцем аккаунта. |
| 422 | validation_failed | Error in request fields. error.details specifies the reason for each field. |
| 409 | conflict | Action is currently not possible for this order (e.g., order cannot be canceled or pickup already ordered). Reason text in error.message. |
| 503 | provider_unavailable | The carrier is temporarily unavailable. Please try again later. |
| 422 | idempotency_key_required | Missing or invalid Idempotency-Key header: must be 16–64 characters A-Za-z0-9_-. |
| 422 | idempotency_key_reused | Этот Idempotency-Key уже использован для другого запроса: для нового запроса нужен новый ключ. |
| 403 | insufficient_scope | Key lacks the required permission, specified in error.details.required_scope. |
| 429 | rate_limited | Key request limit exceeded. Retry after the time specified in the Retry-After header. |