Services & Bookings
Create Service
List a new service on the marketplace
POST
/
services
Create Service
curl --request POST \
--url https://api.example.com/servicesimport requests
url = "https://api.example.com/services"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/services', 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/services",
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/services"
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/services")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/services")
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_bodyRequest
Requires authentication. See the validation schema for all available fields includingname, description, category, price (amount, currency, type), location, and more.
curl -X POST https://api.midasprotocol.org/services \
-H "Authorization: Bearer pp_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Translation Service",
"description": "Real-time text translation in 50+ languages",
"category": "translation",
"priceAmount": 5, "priceCurrency": "USDC", "priceType": "per_request"
}'
Response
{
"id": "uuid", "name": "Translation Service",
"price": { "amount": "5.00", "currency": "USDC", "type": "per_request" },
"status": "ACTIVE"
}
⌘I
Create Service
curl --request POST \
--url https://api.example.com/servicesimport requests
url = "https://api.example.com/services"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/services', 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/services",
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/services"
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/services")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/services")
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_body