Atualizar bucket
curl --request PATCH \
--url https://api.pagstack.com/v1/buckets/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"color": "<string>",
"slug": "<unknown>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
color: '<string>',
slug: '<unknown>'
})
};
fetch('https://api.pagstack.com/v1/buckets/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pagstack.com/v1/buckets/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"color": "<string>",
"slug": "<unknown>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "bkt_cm4x9q2k80001",
"object": "bucket",
"livemode": false,
"name": "Assinaturas Premium",
"slug": "premium",
"description": "Receitas do plano Premium",
"color": "#7C3AED",
"icon": "repeat",
"status": "active",
"created_at": "2026-12-03T12:00:00.000Z",
"updated_at": "2026-12-03T12:00:00.000Z",
"archived_at": null
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}Buckets
Atualizar bucket
Altera nome, descrição, cor ou ícone. O slug não muda (envie e recebe 422). Transações já criadas mostram o nome novo.
Atualizar bucket
curl --request PATCH \
--url https://api.pagstack.com/v1/buckets/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"color": "<string>",
"slug": "<unknown>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
color: '<string>',
slug: '<unknown>'
})
};
fetch('https://api.pagstack.com/v1/buckets/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pagstack.com/v1/buckets/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"color": "<string>",
"slug": "<unknown>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "bkt_cm4x9q2k80001",
"object": "bucket",
"livemode": false,
"name": "Assinaturas Premium",
"slug": "premium",
"description": "Receitas do plano Premium",
"color": "#7C3AED",
"icon": "repeat",
"status": "active",
"created_at": "2026-12-03T12:00:00.000Z",
"updated_at": "2026-12-03T12:00:00.000Z",
"archived_at": null
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}
}Autorizações
Corpo
application/json
Resposta
Sucesso.
Bucket: agrupador de receitas dentro da conta. Não tem saldo próprio.