Update or rotate a generation-provider key
curl --request PATCH \
--url https://api.interchange.io/api/v2/buyer/creative/model-credentials/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "<string>",
"label": "<string>",
"advertiserIds": [
4503599627370495
],
"isDefault": true
}
'import requests
url = "https://api.interchange.io/api/v2/buyer/creative/model-credentials/{id}"
payload = {
"apiKey": "<string>",
"label": "<string>",
"advertiserIds": [4503599627370495],
"isDefault": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
apiKey: '<string>',
label: '<string>',
advertiserIds: [4503599627370495],
isDefault: true
})
};
fetch('https://api.interchange.io/api/v2/buyer/creative/model-credentials/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"customerId": 0,
"advertiserIds": [
"<string>"
],
"isDefault": true,
"providerType": "<string>",
"providerDisplayName": "<string>",
"label": "<string>",
"status": "ACTIVE",
"maskedKey": "<string>",
"connectedBy": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Creatives
Update or rotate a generation-provider key
Update a buyer generation-provider credential. Supplying apiKey atomically rotates only the stored secret while preserving the credential’s label, advertiser assignments, and default status unless those fields are also explicitly changed. Requires buyer-generative-creative.
PATCH
/
creative
/
model-credentials
/
{id}
Update or rotate a generation-provider key
curl --request PATCH \
--url https://api.interchange.io/api/v2/buyer/creative/model-credentials/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "<string>",
"label": "<string>",
"advertiserIds": [
4503599627370495
],
"isDefault": true
}
'import requests
url = "https://api.interchange.io/api/v2/buyer/creative/model-credentials/{id}"
payload = {
"apiKey": "<string>",
"label": "<string>",
"advertiserIds": [4503599627370495],
"isDefault": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
apiKey: '<string>',
label: '<string>',
advertiserIds: [4503599627370495],
isDefault: true
})
};
fetch('https://api.interchange.io/api/v2/buyer/creative/model-credentials/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"customerId": 0,
"advertiserIds": [
"<string>"
],
"isDefault": true,
"providerType": "<string>",
"providerDisplayName": "<string>",
"label": "<string>",
"status": "ACTIVE",
"maskedKey": "<string>",
"connectedBy": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Authorizations
API key or access token
Path Parameters
Pattern:
^[1-9]\d*$Body
application/json
Response
Update or rotate a generation-provider key
Required range:
-9007199254740991 <= x <= 9007199254740991Available options:
ACTIVE, REVOKED, ERROR