Criar um projeto
curl --request POST \
--url https://api.misespay.com/v2/projects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Minha Loja",
"color": "#3B82F6",
"description": "Loja virtual de eletrônicos",
"logoUrl": "https://example.com/logo.png"
}
'import requests
url = "https://api.misespay.com/v2/projects"
payload = {
"name": "Minha Loja",
"color": "#3B82F6",
"description": "Loja virtual de eletrônicos",
"logoUrl": "https://example.com/logo.png"
}
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({
name: 'Minha Loja',
color: '#3B82F6',
description: 'Loja virtual de eletrônicos',
logoUrl: 'https://example.com/logo.png'
})
};
fetch('https://api.misespay.com/v2/projects', 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.misespay.com/v2/projects",
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([
'name' => 'Minha Loja',
'color' => '#3B82F6',
'description' => 'Loja virtual de eletrônicos',
'logoUrl' => 'https://example.com/logo.png'
]),
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.misespay.com/v2/projects"
payload := strings.NewReader("{\n \"name\": \"Minha Loja\",\n \"color\": \"#3B82F6\",\n \"description\": \"Loja virtual de eletrônicos\",\n \"logoUrl\": \"https://example.com/logo.png\"\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.misespay.com/v2/projects")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Minha Loja\",\n \"color\": \"#3B82F6\",\n \"description\": \"Loja virtual de eletrônicos\",\n \"logoUrl\": \"https://example.com/logo.png\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.misespay.com/v2/projects")
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 \"name\": \"Minha Loja\",\n \"color\": \"#3B82F6\",\n \"description\": \"Loja virtual de eletrônicos\",\n \"logoUrl\": \"https://example.com/logo.png\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Minha Loja",
"color": "#3B82F6",
"createdAt": "2023-11-07T05:31:56Z",
"description": "Loja virtual de eletrônicos",
"logoUrl": "https://example.com/logo.png"
}{
"statusCode": 400,
"error": "BadRequest",
"message": "name must be longer than or equal to 2 characters",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication token is required",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 409,
"error": "Conflict",
"message": "Resource with name 'Example' already exists",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {
"resource": "Example",
"field": "name",
"value": "Example"
},
"traceId": "<string>"
}{
"statusCode": 500,
"error": "InternalError",
"message": "An unexpected error occurred",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "2771463d58840c8e116dc6dda1e1e5d0"
}Projetos
Criar Projeto
Cria um novo projeto.
Permissão requerida: PROJECT:WRITE ou FULL_ACCESS
POST
/
projects
Criar um projeto
curl --request POST \
--url https://api.misespay.com/v2/projects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Minha Loja",
"color": "#3B82F6",
"description": "Loja virtual de eletrônicos",
"logoUrl": "https://example.com/logo.png"
}
'import requests
url = "https://api.misespay.com/v2/projects"
payload = {
"name": "Minha Loja",
"color": "#3B82F6",
"description": "Loja virtual de eletrônicos",
"logoUrl": "https://example.com/logo.png"
}
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({
name: 'Minha Loja',
color: '#3B82F6',
description: 'Loja virtual de eletrônicos',
logoUrl: 'https://example.com/logo.png'
})
};
fetch('https://api.misespay.com/v2/projects', 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.misespay.com/v2/projects",
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([
'name' => 'Minha Loja',
'color' => '#3B82F6',
'description' => 'Loja virtual de eletrônicos',
'logoUrl' => 'https://example.com/logo.png'
]),
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.misespay.com/v2/projects"
payload := strings.NewReader("{\n \"name\": \"Minha Loja\",\n \"color\": \"#3B82F6\",\n \"description\": \"Loja virtual de eletrônicos\",\n \"logoUrl\": \"https://example.com/logo.png\"\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.misespay.com/v2/projects")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Minha Loja\",\n \"color\": \"#3B82F6\",\n \"description\": \"Loja virtual de eletrônicos\",\n \"logoUrl\": \"https://example.com/logo.png\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.misespay.com/v2/projects")
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 \"name\": \"Minha Loja\",\n \"color\": \"#3B82F6\",\n \"description\": \"Loja virtual de eletrônicos\",\n \"logoUrl\": \"https://example.com/logo.png\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Minha Loja",
"color": "#3B82F6",
"createdAt": "2023-11-07T05:31:56Z",
"description": "Loja virtual de eletrônicos",
"logoUrl": "https://example.com/logo.png"
}{
"statusCode": 400,
"error": "BadRequest",
"message": "name must be longer than or equal to 2 characters",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication token is required",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 409,
"error": "Conflict",
"message": "Resource with name 'Example' already exists",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {
"resource": "Example",
"field": "name",
"value": "Example"
},
"traceId": "<string>"
}{
"statusCode": 500,
"error": "InternalError",
"message": "An unexpected error occurred",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "2771463d58840c8e116dc6dda1e1e5d0"
}Autorizações
Access token obtido no POST /auth (client_id + client_secret). Válido por 300 segundos.
Corpo
application/json
Nome do projeto
Maximum string length:
255Exemplo:
"Minha Loja"
Cor do projeto em formato hexadecimal
Pattern:
^#[0-9A-Fa-f]{6}$Exemplo:
"#3B82F6"
Descrição do projeto
Exemplo:
"Loja virtual de eletrônicos"
URL do logo do projeto
Exemplo:
"https://example.com/logo.png"
Resposta
Projeto criado com sucesso
ID do projeto
Nome do projeto
Exemplo:
"Minha Loja"
Cor do projeto em formato hexadecimal
Exemplo:
"#3B82F6"
Data de criação
Descrição do projeto
Exemplo:
"Loja virtual de eletrônicos"
URL do logo do projeto
Exemplo:
"https://example.com/logo.png"
⌘I

