Create a record
curl --request POST \
--url https://api.example.com/exo-api/resources/{name}import requests
url = "https://api.example.com/exo-api/resources/{name}"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/exo-api/resources/{name}', 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.example.com/exo-api/resources/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/exo-api/resources/{name}"
req, _ := http.NewRequest("POST", url, nil)
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.example.com/exo-api/resources/{name}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/exo-api/resources/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyResources
Create a record
Creates a new record for the specified resource.
POST
/
exo-api
/
resources
/
{name}
Create a record
curl --request POST \
--url https://api.example.com/exo-api/resources/{name}import requests
url = "https://api.example.com/exo-api/resources/{name}"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/exo-api/resources/{name}', 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.example.com/exo-api/resources/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/exo-api/resources/{name}"
req, _ := http.NewRequest("POST", url, nil)
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.example.com/exo-api/resources/{name}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/exo-api/resources/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyCreates a new record. The request body is validated against the resource’s
createRules. If the resource has an ownerColumn, it’s automatically set to the authenticated user’s ID.
Path parameters
string
required
The resource name (e.g.
contact, order).Request body
The fields to create the record with. The exact fields depend on the resource’screateRules method.
Request
curl -X POST \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Smith",
"email": "[email protected]",
"phone": "+1-555-0123"
}' \
https://your-app.com/exo-api/resources/contact
Response
Returns the created record’s transformed data with a201 Created status.
Example response:
{
"id": 5,
"name": "Jane Smith",
"email": "[email protected]",
"phone": "+1-555-0123",
"created_at": "2026-03-28T14:30:00+00:00"
}
Errors
| Status | Description |
|---|---|
404 | Resource name not found |
405 | Resource does not support creation (supportsCreate returns false) |
422 | Validation failed — see errors object for details |