curl -X POST 'https://api.example.com/api/partners' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"name": "example_name",
"link": "example_link",
"position": 123,
"about": "example_about",
"urlId": "123"
}'
const response = await fetch('https://api.example.com/api/partners', {
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json"
},
"body": JSON.stringify({
"name": "example_name",
"link": "example_link",
"position": 123,
"about": "example_about",
"urlId": "123"
})
})
const data = await response.json()
import requests
response = requests.post('https://api.example.com/api/partners', headers={
"Authorization": "Bearer YOUR_API_TOKEN",
"Content-Type": "application/json"
}, json={
"name": "example_name",
"link": "example_link",
"position": 123,
"about": "example_about",
"urlId": "123"
})
data = response.json()
<?php
$context = stream_context_create([
'http' => [
'method' => 'POST',
'header' => "Authorization: Bearer YOUR_API_TOKEN\\r\\nContent-Type: application/json",
'content' => json_encode([
"name" => "example_name",
"link" => "example_link",
"position" => 123,
"about" => "example_about",
"urlId" => "123"
])
]
]);
$response = file_get_contents('https://api.example.com/api/partners', false, $context);
$data = json_decode($response, true);