creates a new partner token
Creates a partner token for the authenticated company. label is required and must be unique within the company; expires_at is optional (omit it for a token that never expires), and role_id optionally scopes the token to one of the company’s roles. The response is the only time the full token value (prefixed PT-) is returned, so store it securely. Returns 422 when validation fails, including when issuing new partner tokens has been disabled platform-wide. Requires a company admin Bearer token with the developer update permission. This is the older path for the same operation under /api/v2025-06/tokens/partner; prefer that path for new integrations.
curl --request POST \
--url https://api.fluid.app/api/v2025-06/partner_tokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"partner_token": {
"label": "Pied Piper order sync",
"expires_at": "2027-09-14T00:00:00Z",
"role_id": 5214
}
}
'import requests
url = "https://api.fluid.app/api/v2025-06/partner_tokens"
payload = { "partner_token": {
"label": "Pied Piper order sync",
"expires_at": "2027-09-14T00:00:00Z",
"role_id": 5214
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
partner_token: {
label: 'Pied Piper order sync',
expires_at: '2027-09-14T00:00:00Z',
role_id: 5214
}
})
};
fetch('https://api.fluid.app/api/v2025-06/partner_tokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/v2025-06/partner_tokens",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'partner_token' => [
'label' => 'Pied Piper order sync',
'expires_at' => '2027-09-14T00:00:00Z',
'role_id' => 5214
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/v2025-06/partner_tokens"
payload := strings.NewReader("{\n \"partner_token\": {\n \"label\": \"Pied Piper order sync\",\n \"expires_at\": \"2027-09-14T00:00:00Z\",\n \"role_id\": 5214\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/v2025-06/partner_tokens")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"partner_token\": {\n \"label\": \"Pied Piper order sync\",\n \"expires_at\": \"2027-09-14T00:00:00Z\",\n \"role_id\": 5214\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/v2025-06/partner_tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"partner_token\": {\n \"label\": \"Pied Piper order sync\",\n \"expires_at\": \"2027-09-14T00:00:00Z\",\n \"role_id\": 5214\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 48213,
"label": "Pied Piper order sync",
"token": "PT-k7Qm2VxR9pLcT4wZ8nHd3bYs",
"token_display": "PT-****3bYs",
"created_at": "2026-09-14T16:05:22Z",
"expires_at": "2027-09-14T00:00:00Z",
"role_id": 5214,
"meta": {
"request_id": "8c2f4e71-3b9a-4d6e-a1f5-7e0b9c3d2a48",
"timestamp": "2026-09-14T16:05:22Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"cursor": "<string>",
"limit": 123,
"prev_cursor": "<string>",
"next_cursor": "<string>",
"total_count": 123
}
}
}{
"message": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"cursor": "<string>",
"limit": 123,
"prev_cursor": "<string>",
"next_cursor": "<string>",
"total_count": 123
}
}
}{
"error_message": "unprocessable entity",
"errors": {
"partner_token": {
"label": [
"has already been taken"
]
}
},
"meta": {
"request_id": "req_ghi789",
"timestamp": "2026-04-14T15:00:00Z"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Show child attributes
Show child attributes
curl --request POST \
--url https://api.fluid.app/api/v2025-06/partner_tokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"partner_token": {
"label": "Pied Piper order sync",
"expires_at": "2027-09-14T00:00:00Z",
"role_id": 5214
}
}
'import requests
url = "https://api.fluid.app/api/v2025-06/partner_tokens"
payload = { "partner_token": {
"label": "Pied Piper order sync",
"expires_at": "2027-09-14T00:00:00Z",
"role_id": 5214
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
partner_token: {
label: 'Pied Piper order sync',
expires_at: '2027-09-14T00:00:00Z',
role_id: 5214
}
})
};
fetch('https://api.fluid.app/api/v2025-06/partner_tokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/v2025-06/partner_tokens",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'partner_token' => [
'label' => 'Pied Piper order sync',
'expires_at' => '2027-09-14T00:00:00Z',
'role_id' => 5214
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/v2025-06/partner_tokens"
payload := strings.NewReader("{\n \"partner_token\": {\n \"label\": \"Pied Piper order sync\",\n \"expires_at\": \"2027-09-14T00:00:00Z\",\n \"role_id\": 5214\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/v2025-06/partner_tokens")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"partner_token\": {\n \"label\": \"Pied Piper order sync\",\n \"expires_at\": \"2027-09-14T00:00:00Z\",\n \"role_id\": 5214\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/v2025-06/partner_tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"partner_token\": {\n \"label\": \"Pied Piper order sync\",\n \"expires_at\": \"2027-09-14T00:00:00Z\",\n \"role_id\": 5214\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 48213,
"label": "Pied Piper order sync",
"token": "PT-k7Qm2VxR9pLcT4wZ8nHd3bYs",
"token_display": "PT-****3bYs",
"created_at": "2026-09-14T16:05:22Z",
"expires_at": "2027-09-14T00:00:00Z",
"role_id": 5214,
"meta": {
"request_id": "8c2f4e71-3b9a-4d6e-a1f5-7e0b9c3d2a48",
"timestamp": "2026-09-14T16:05:22Z"
}
}{
"message": "<string>",
"error": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"cursor": "<string>",
"limit": 123,
"prev_cursor": "<string>",
"next_cursor": "<string>",
"total_count": 123
}
}
}{
"message": "<string>",
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"pagination": {
"cursor": "<string>",
"limit": 123,
"prev_cursor": "<string>",
"next_cursor": "<string>",
"total_count": 123
}
}
}{
"error_message": "unprocessable entity",
"errors": {
"partner_token": {
"label": [
"has already been taken"
]
}
},
"meta": {
"request_id": "req_ghi789",
"timestamp": "2026-04-14T15:00:00Z"
}
}