Criar bucket
curl --request POST \
--url https://api.pagstack.com/v1/buckets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"color": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', slug: '<string>', description: '<string>', color: '<string>'})
};
fetch('https://api.pagstack.com/v1/buckets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pagstack.com/v1/buckets"
payload = {
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"color": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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
Criar bucket
Cria um bucket para agrupar receitas. O id e o slug não mudam depois de criados. Buckets não têm saldo próprio: o dinheiro continua no saldo da conta.
Criar bucket
curl --request POST \
--url https://api.pagstack.com/v1/buckets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"color": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', slug: '<string>', description: '<string>', color: '<string>'})
};
fetch('https://api.pagstack.com/v1/buckets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pagstack.com/v1/buckets"
payload = {
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"color": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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
Cabeçalhos
Corpo
application/json
Resposta
Sucesso.
Bucket: agrupador de receitas dentro da conta. Não tem saldo próprio.