POST
/biz-partners/{id}/contactsCreate Biz partner contact.
Privileges: biz-core.manage
Audit event:
- biz.core.v2.biz.partner.contact.post
Errors:
- BIZ_CORE:BIZ_PARTNER_NOT_FOUND - Biz partner not found.
- SECTION_CODE_NAME_NOT_SUPPORTED - Section code name not supported.
- BIZ_CORE:PARTNER_CONTACT_NOTFOUND - Partner contact not found.
Validation errors:
- BIZ_CORE:FIRST_NAME_MUST_BE_PROVIDED - biz partner contact first name must be provided
- BIZ_CORE:FIRST_NAME_CANNOT_BE_LONGER_THAN_30_CHARACTERS - biz partner contact first name cannot be longer than 30 characters
- BIZ_CORE:LAST_NAME_MUST_BE_PROVIDED - biz partner contact last name must be provided
- BIZ_CORE:LAST_NAME_CANNOT_BE_LONGER_THAN_50_CHARACTERS - biz partner contact last name cannot be longer than 50 characters
- BIZ_CORE:NICK_NAME_CANNOT_BE_LONGER_THAN_30_CHARACTERS - biz partner contact nick name cannot be longer than 30 characters
- BIZ_CORE:PARTNER_CONTACT_SALUTATION_NOT_SUPPORTED - Salutation of the Biz partner contact is not supported.
- BIZ_CORE:TITEL_CANNOT_BE_LONGER_THAN_60_CHARACTERS - biz partner contact titel cannot be longer than 60 characters
- BIZ_CORE:PARTNER_CONTACT_GENDER_NOT_SUPPORTED - Gender of the Biz partner contact is not supported.
- BIZ_CORE:LANGUAGE_MUST_BE_2_CHARACTERS_LONG - Language must be 2 characters long.
- BIZ_CORE:PARTNER_CONTACT_E_MAIL_BUSINESS_OUT_OF_LIMIT - Email business of the biz partner contact cannot be longer than 255 characters.
- BIZ_CORE:PARTNER_CONTACT_E_MAIL_BUSINESS_NOT_VALID - Email business of the biz partner contact is not valid.
- BIZ_CORE:PARTNER_CONTACT_E_MAIL_PRIVATE_OUT_OF_LIMIT - Email private of the biz partner contact cannot be longer than 255 characters.
- BIZ_CORE:PARTNER_CONTACT_E_MAIL_PRIVATE_NOT_VALID - Email private of the biz partner contact is not valid.
- BIZ_CORE:PARTNER_CONTACT_PHONE_OFFICE_DIRECT_OUT_OF_LIMIT - Phone office direct of the biz partner contact cannot be longer than 30 characters.
- BIZ_CORE:PARTNER_CONTACT_PHONE_OFFICE_DIRECT_NOT_VALID -
- BIZ_CORE:PARTNER_CONTACT_PHONE_OFFICE_CENTRAL_OUT_OF_LIMIT - Phone office central of the biz partner contact cannot be longer than 30 characters.
- BIZ_CORE:PARTNER_CONTACT_PHONE_OFFICE_CENTRAL_NOT_VALID -
- BIZ_CORE:PARTNER_CONTACT_MOBILE_OUT_OF_LIMIT - Mobile of the biz partner contact cannot be longer than 30 characters.
- BIZ_CORE:PARTNER_CONTACT_MOBILE_NOT_VALID -
- BIZ_CORE:PARTNER_CONTACT_MOBILE_BUSINESS_OUT_OF_LIMIT - Mobile business of the biz partner contact cannot be longer than 30 characters.
- BIZ_CORE:PARTNER_CONTACT_MOBILE_BUSINESS_NOT_VALID -
- BIZ_CORE:PARTNER_CONTACT_SKYPE_OUT_OF_LIMIT - Skype of the biz partner contact cannot be longer than 30 characters.
- BIZ_CORE:PARTNER_PARTNER_BIRTHDAY_IS_NOT_VALID - Birthday of the biz partner contact is not valid.
- BIZ_CORE:CONTACT_TYPE_ID_NOT_VALID - Contact type id is not valid.
- BIZ_CORE:PARTNER_CONTACT_TYPE_NOT_FOUND - Partner contact type not found.
- BIZ_CORE:PARTNER_CONTACT_CUSTOM_TYPE_NAME_OUT_OF_LIMIT - Custom type name of the biz partner contact cannot be longer than 30 characters.
- BIZ_CORE:DEPARTMENT_ID_NOT_VALID - Department id is not valid.
- BIZ_CORE:_PARTNER_DEPARTMENT_NOT_FOUND - Department of the biz partner contact not found.
- BIZ_CORE:POSITION_ID_NOT_VALID - Position id is not valid.
- BIZ_CORE:PARTNER_POSITION_NOT_FOUND - Position of the biz partner contact not found.
- BIZ_CORE:PARTNER_CONTACT_CUSTOM_POSITION_NAME_OUT_OF_LIMIT - Custom position name of the biz partner contact cannot be longer than 50 characters.
- BIZ_CORE:PARTNER_CONTACT_FAX_OUT_OF_LIMIT - Fax of the biz partner contact cannot be longer than 30 characters.
- BIZ_CORE:PARTNER_CONTACT_FAX_NOT_VALID -
- BIZ_CORE:PARTNER_CONTACT_ADDRESS_OUT_OF_LIMIT - Address of the biz partner contact cannot be longer than 150 characters.
- BIZ_CORE:PARTNER_CONTACT_POSTAL_CODE_OUT_OF_LIMIT - Postal code of the biz partner contact cannot be longer than 20 characters.
- BIZ_CORE:PARTNER_CONTACT_CITY_OUT_OF_LIMIT - City of the biz partner contact cannot be longer than 100 characters.
- BIZ_CORE:COUNTRY_ID_NOT_VALID - Country id is not valid.
- BIZ_CORE:PARTNER_COUNTRY_NOT_FOUND - Country of the biz partner contact not found.
- BIZ_CORE:ATTRIBUTE_VALUE_CANNOT_BE_LONGER_THAN_255_CHARACTERS - Attribute value cannot be longer than 255 characters.
- BIZ_CORE:CUSTOM_ATTR_NAME_CANNOT_BE_LONGER_THAN_50_CHARACTERS - Custom attr name cannot be longer than 50 characters.
- BIZ_CORE:ATTRIBUTE_FOR_GIVEN_ID_NOT_FOUND - Attribute for given id not found.
Request
Path parameters
idintegerrequired
id.
Body
application/json
addressstring
birthdaystring (date)
citystring
contactTypeIdinteger
countryIdinteger
customPositionNamestring
customTypeNamestring
departmentIdinteger
eMailBusinessstring
eMailPrivatestring
extraAttributesobject
Show child attributes
dataobject[]
Show child attributes
attributeIdinteger
attributeValuestring
customAttrNamestring
faxstring
firstNamestring
genderstring
languagestring
lastNamestring
mobilestring
mobileBusinessstring
nickNamestring
phoneOfficeCentralstring
phoneOfficeDirectstring
positionIdinteger
postalCodestring
salutationstring
skypestring
titelstring
Request example
C# · HttpClient
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <access_token>");
var content = new StringContent("{\"address\":\"string\",\"birthday\":\"2026-01-01\",\"city\":\"string\",\"contactTypeId\":0,\"countryId\":0,\"customPositionName\":\"string\",\"customTypeName\":\"string\",\"departmentId\":0,\"eMailBusiness\":\"string\",\"eMailPrivate\":\"string\",\"extraAttributes\":{\"data\":[{\"attributeId\":0,\"attributeValue\":\"string\",\"customAttrName\":\"string\"}]},\"fax\":\"string\",\"firstName\":\"string\",\"gender\":\"string\",\"language\":\"string\",\"lastName\":\"string\",\"mobile\":\"string\",\"mobileBusiness\":\"string\",\"nickName\":\"string\",\"phoneOfficeCentral\":\"string\",\"phoneOfficeDirect\":\"string\",\"positionId\":0,\"postalCode\":\"string\",\"salutation\":\"string\",\"skype\":\"string\",\"titel\":\"string\"}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());C# · RestSharp
var options = new RestClientOptions("")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer <access_token>");
var body = "{\"address\":\"string\",\"birthday\":\"2026-01-01\",\"city\":\"string\",\"contactTypeId\":0,\"countryId\":0,\"customPositionName\":\"string\",\"customTypeName\":\"string\",\"departmentId\":0,\"eMailBusiness\":\"string\",\"eMailPrivate\":\"string\",\"extraAttributes\":{\"data\":[{\"attributeId\":0,\"attributeValue\":\"string\",\"customAttrName\":\"string\"}]},\"fax\":\"string\",\"firstName\":\"string\",\"gender\":\"string\",\"language\":\"string\",\"lastName\":\"string\",\"mobile\":\"string\",\"mobileBusiness\":\"string\",\"nickName\":\"string\",\"phoneOfficeCentral\":\"string\",\"phoneOfficeDirect\":\"string\",\"positionId\":0,\"postalCode\":\"string\",\"salutation\":\"string\",\"skype\":\"string\",\"titel\":\"string\"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);cURL · cURL
curl -L -X POST "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer <access_token>" \
--data-raw '{
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
}'Dart · dio
var headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <access_token>'
};
var data = json.encode({
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
});
var dio = Dio();
var response = await dio.request(
'https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts',
options: Options(
method: 'POST',
headers: headers,
),
data: data,
);
if (response.statusCode == 200) {
print(json.encode(response.data));
}
else {
print(response.statusMessage);
}Dart · http
var headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <access_token>'
};
var request = http.Request('POST', Uri.parse('https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts'));
request.body = json.encode({
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
});
request.headers.addAll(headers);
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}Go · Native
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts"
method := "POST"
payload := strings.NewReader(`{
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
}`)
client := &http.Client{}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer <access_token>")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}HTTP · HTTP
POST /biz-core/v2/biz-partners/{id}/contacts HTTP/1.1
Host: api-cpaas.sms.es
Content-Type: application/json
Accept: application/json
Authorization: Bearer <access_token>
Content-Length: 623
{
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
}Java · OkHttp
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"address\":\"string\",\"birthday\":\"2026-01-01\",\"city\":\"string\",\"contactTypeId\":0,\"countryId\":0,\"customPositionName\":\"string\",\"customTypeName\":\"string\",\"departmentId\":0,\"eMailBusiness\":\"string\",\"eMailPrivate\":\"string\",\"extraAttributes\":{\"data\":[{\"attributeId\":0,\"attributeValue\":\"string\",\"customAttrName\":\"string\"}]},\"fax\":\"string\",\"firstName\":\"string\",\"gender\":\"string\",\"language\":\"string\",\"lastName\":\"string\",\"mobile\":\"string\",\"mobileBusiness\":\"string\",\"nickName\":\"string\",\"phoneOfficeCentral\":\"string\",\"phoneOfficeDirect\":\"string\",\"positionId\":0,\"postalCode\":\"string\",\"salutation\":\"string\",\"skype\":\"string\",\"titel\":\"string\"}");
Request request = new Request.Builder()
.url("https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer <access_token>")
.build();
Response response = client.newCall(request).execute();Java · Unirest
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("Authorization", "Bearer <access_token>")
.body("{\"address\":\"string\",\"birthday\":\"2026-01-01\",\"city\":\"string\",\"contactTypeId\":0,\"countryId\":0,\"customPositionName\":\"string\",\"customTypeName\":\"string\",\"departmentId\":0,\"eMailBusiness\":\"string\",\"eMailPrivate\":\"string\",\"extraAttributes\":{\"data\":[{\"attributeId\":0,\"attributeValue\":\"string\",\"customAttrName\":\"string\"}]},\"fax\":\"string\",\"firstName\":\"string\",\"gender\":\"string\",\"language\":\"string\",\"lastName\":\"string\",\"mobile\":\"string\",\"mobileBusiness\":\"string\",\"nickName\":\"string\",\"phoneOfficeCentral\":\"string\",\"phoneOfficeDirect\":\"string\",\"positionId\":0,\"postalCode\":\"string\",\"salutation\":\"string\",\"skype\":\"string\",\"titel\":\"string\"}")
.asString();JavaScript · Fetch
const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Accept", "application/json");
myHeaders.append("Authorization", "Bearer <access_token>");
const raw = JSON.stringify({
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
});
const requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));JavaScript · jQuery
var settings = {
"url": "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer <access_token>"
},
"data": JSON.stringify({
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
})
};
$.ajax(settings).done(function (response) {
console.log(response);
});JavaScript · XHR
var data = JSON.stringify({
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
xhr.setRequestHeader("Authorization", "Bearer <access_token>");
xhr.send(data);Kotlin · OkHttp
val client = OkHttpClient()
val mediaType = "application/json".toMediaType()
val body = """
{
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
}
""".trimIndent().toRequestBody(mediaType)
val request = Request.Builder()
.url("https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts")
.post(body)
.addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer <access_token>")
.build()
val response = client.newCall(request).execute()C · libcurl
#include <stdio.h>
#include <curl/curl.h>
int main(void) {
CURL *curl = curl_easy_init();
if (curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Content-Type: application/json");
headers = curl_slist_append(headers, "Accept: application/json");
headers = curl_slist_append(headers, "Authorization: Bearer <access_token>");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
const char *data = "{\"address\":\"string\",\"birthday\":\"2026-01-01\",\"city\":\"string\",\"contactTypeId\":0,\"countryId\":0,\"customPositionName\":\"string\",\"customTypeName\":\"string\",\"departmentId\":0,\"eMailBusiness\":\"string\",\"eMailPrivate\":\"string\",\"extraAttributes\":{\"data\":[{\"attributeId\":0,\"attributeValue\":\"string\",\"customAttrName\":\"string\"}]},\"fax\":\"string\",\"firstName\":\"string\",\"gender\":\"string\",\"language\":\"string\",\"lastName\":\"string\",\"mobile\":\"string\",\"mobileBusiness\":\"string\",\"nickName\":\"string\",\"phoneOfficeCentral\":\"string\",\"phoneOfficeDirect\":\"string\",\"positionId\":0,\"postalCode\":\"string\",\"salutation\":\"string\",\"skype\":\"string\",\"titel\":\"string\"}";
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
CURLcode res = curl_easy_perform(curl);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
}
return 0;
}Node.js · Axios
const axios = require('axios');
let data = JSON.stringify({
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <access_token>'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});Node.js · Native
const https = require('follow-redirects').https;
const fs = require('fs');
let options = {
'method': 'POST',
'hostname': 'api-cpaas.sms.es',
'path': '/biz-core/v2/biz-partners/{id}/contacts',
'headers': {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <access_token>'
},
'maxRedirects': 20
};
const req = https.request(options, function (res) {
let chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
let body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
let postData = JSON.stringify({
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
});
req.write(postData);
req.end();Objective-C · NSURLSession
#import <Foundation/Foundation.h>
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
NSDictionary *headers = @{
@"Content-Type": @"application/json",
@"Accept": @"application/json",
@"Authorization": @"Bearer <access_token>"
};
[request setAllHTTPHeaderFields:headers];
NSData *postData = [[NSData alloc] initWithData:[@"{\"address\":\"string\",\"birthday\":\"2026-01-01\",\"city\":\"string\",\"contactTypeId\":0,\"countryId\":0,\"customPositionName\":\"string\",\"customTypeName\":\"string\",\"departmentId\":0,\"eMailBusiness\":\"string\",\"eMailPrivate\":\"string\",\"extraAttributes\":{\"data\":[{\"attributeId\":0,\"attributeValue\":\"string\",\"customAttrName\":\"string\"}]},\"fax\":\"string\",\"firstName\":\"string\",\"gender\":\"string\",\"language\":\"string\",\"lastName\":\"string\",\"mobile\":\"string\",\"mobileBusiness\":\"string\",\"nickName\":\"string\",\"phoneOfficeCentral\":\"string\",\"phoneOfficeDirect\":\"string\",\"positionId\":0,\"postalCode\":\"string\",\"salutation\":\"string\",\"skype\":\"string\",\"titel\":\"string\"}" dataUsingEncoding:NSUTF8StringEncoding]];
[request setHTTPBody:postData];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
dispatch_semaphore_signal(sema);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSError *parseError = nil;
NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
NSLog(@"%@",responseDictionary);
dispatch_semaphore_signal(sema);
}
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);OCaml · Cohttp
open Lwt
open Cohttp
open Cohttp_lwt_unix
let postData = ref {|{
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
}|};;
let reqBody =
let uri = Uri.of_string "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts" in
let headers = Header.init ()
|> fun h -> Header.add h "Content-Type" "application/json"
|> fun h -> Header.add h "Accept" "application/json"
|> fun h -> Header.add h "Authorization" "Bearer <access_token>"
in
let body = Cohttp_lwt.Body.of_string !postData in
Client.call ~headers ~body `POST uri >>= fun (_resp, body) ->
body |> Cohttp_lwt.Body.to_string >|= fun body -> body
let () =
let respBody = Lwt_main.run reqBody in
print_endline (respBody)PHP · cURL
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Accept: application/json',
'Authorization: Bearer <access_token>'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
PHP · Guzzle
<?php
$client = new Client();
$headers = [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer <access_token>'
];
$body = '{
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
}';
$request = new Request('POST', 'https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
PowerShell · RestMethod
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/json")
$headers.Add("Accept", "application/json")
$headers.Add("Authorization", "Bearer <access_token>")
$body = @"
{
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
}
"@
$response = Invoke-RestMethod "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts" -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-JsonPython · Requests
import requests
import json
url = "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts"
payload = json.dumps({
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
})
headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer <access_token>"
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)Python · http.client
import http.client
import json
conn = http.client.HTTPSConnection("api-cpaas.sms.es")
payload = json.dumps({
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
})
headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer <access_token>"
}
conn.request("POST", "/biz-core/v2/biz-partners/{id}/contacts", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))R · httr
library(httr)
headers = c(
'Content-Type' = 'application/json',
'Accept' = 'application/json',
'Authorization' = 'Bearer <access_token>'
)
body = '{
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
}';
res <- VERB("POST", url = "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts", body = body, add_headers(headers))
cat(content(res, 'text'))Ruby · Net::HTTP
require "uri"
require "json"
require "net/http"
url = URI("https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Accept"] = "application/json"
request["Authorization"] = "Bearer <access_token>"
request.body = JSON.dump({
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
})
response = https.request(request)
puts response.read_body
Rust · reqwest
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = reqwest::Client::builder()
.build()?;
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("Content-Type", "application/json".parse()?);
headers.insert("Accept", "application/json".parse()?);
headers.insert("Authorization", "Bearer <access_token>".parse()?);
let data = r#"{
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
}"#;
let json: serde_json::Value = serde_json::from_str(&data)?;
let request = client.request(reqwest::Method::from_bytes(b"POST")?, "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts")
.headers(headers)
.json(&json);
let response = request.send().await?;
let body = response.text().await?;
println!("{}", body);
Ok(())
}Shell · Httpie
printf '{"address":"string","birthday":"2026-01-01","city":"string","contactTypeId":0,"countryId":0,"customPositionName":"string","customTypeName":"string","departmentId":0,"eMailBusiness":"string","eMailPrivate":"string","extraAttributes":{"data":[{"attributeId":0,"attributeValue":"string","customAttrName":"string"}]},"fax":"string","firstName":"string","gender":"string","language":"string","lastName":"string","mobile":"string","mobileBusiness":"string","nickName":"string","phoneOfficeCentral":"string","phoneOfficeDirect":"string","positionId":0,"postalCode":"string","salutation":"string","skype":"string","titel":"string"}' | http --follow --timeout 3600 POST "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts" \
'Content-Type':'application/json' \
'Accept':'application/json' \
'Authorization':'Bearer <access_token>'Shell · wget
wget --no-check-certificate --quiet \
--method POST \
--timeout=0 \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <access_token>' \
--body-data '{"address":"string","birthday":"2026-01-01","city":"string","contactTypeId":0,"countryId":0,"customPositionName":"string","customTypeName":"string","departmentId":0,"eMailBusiness":"string","eMailPrivate":"string","extraAttributes":{"data":[{"attributeId":0,"attributeValue":"string","customAttrName":"string"}]},"fax":"string","firstName":"string","gender":"string","language":"string","lastName":"string","mobile":"string","mobileBusiness":"string","nickName":"string","phoneOfficeCentral":"string","phoneOfficeDirect":"string","positionId":0,"postalCode":"string","salutation":"string","skype":"string","titel":"string"}' \
'https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts'Swift · URLSession
let parameters = """
{
"address": "string",
"birthday": "2026-01-01",
"city": "string",
"contactTypeId": 0,
"countryId": 0,
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeId": 0,
"attributeValue": "string",
"customAttrName": "string"
}
]
},
"fax": "string",
"firstName": "string",
"gender": "string",
"language": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"positionId": 0,
"postalCode": "string",
"salutation": "string",
"skype": "string",
"titel": "string"
}
"""
let postData = parameters.data(using: .utf8)
var request = URLRequest(url: URL(string: "https://api-cpaas.sms.es/biz-core/v2/biz-partners/{id}/contacts")!,timeoutInterval: Double.infinity)
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
request.addValue("application/json", forHTTPHeaderField: "Accept")
request.addValue("Bearer <access_token>", forHTTPHeaderField: "Authorization")
request.httpMethod = "POST"
request.httpBody = postData
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
return
}
print(String(data: data, encoding: .utf8)!)
}
task.resume()Responses
- 200
- default
Biz partner contact created successfully
application/json
addressstring
addressIdinteger
birthdaystring (date)
bizPartnerIdinteger
citystring
contactTypeIdinteger
contactTypeNamestring
countryIdinteger
countryNamestring
customPositionNamestring
customTypeNamestring
departmentIdinteger
departmentNamestring
eMailBusinessstring
eMailPrivatestring
extraAttributesobject
Show child attributes
dataobject[]
Show child attributes
attributeCodeNamestring
attributeIdinteger
attributeNamestring
attributeTypeIdinteger
attributeValuestring
customAttrNamestring
idinteger
sectionIdinteger
faxstring
firstNamestring
genderstring
Possible values:
male, female, unknownidinteger
languagestring
languageNamestring
lastNamestring
mobilestring
mobileBusinessstring
nickNamestring
notestring
partnerBriefNamestring
partnerNamestring
phoneOfficeCentralstring
phoneOfficeDirectstring
picturestring
positionIdinteger
positionNamestring
postalCodestring
salutationstring
Possible values:
formal, informalskypestring
statusstring
Possible values:
active, inactivestatusDtstring (date-time)
titelstring
Example response
{
"address": "string",
"addressId": 0,
"birthday": "2026-01-01",
"bizPartnerId": 0,
"city": "string",
"contactTypeId": 0,
"contactTypeName": "string",
"countryId": 0,
"countryName": "string",
"customPositionName": "string",
"customTypeName": "string",
"departmentId": 0,
"departmentName": "string",
"eMailBusiness": "string",
"eMailPrivate": "string",
"extraAttributes": {
"data": [
{
"attributeCodeName": "string",
"attributeId": 0,
"attributeName": "string",
"attributeTypeId": 0,
"attributeValue": "string",
"customAttrName": "string",
"id": 0,
"sectionId": 0
}
]
},
"fax": "string",
"firstName": "string",
"gender": "male",
"id": 0,
"language": "string",
"languageName": "string",
"lastName": "string",
"mobile": "string",
"mobileBusiness": "string",
"nickName": "string",
"note": "string",
"partnerBriefName": "string",
"partnerName": "string",
"phoneOfficeCentral": "string",
"phoneOfficeDirect": "string",
"picture": "string",
"positionId": 0,
"positionName": "string",
"postalCode": "string",
"salutation": "formal",
"skype": "string",
"status": "active",
"statusDt": "2026-01-01T12:00:00Z",
"titel": "string"
}unexpected error
application/json
Codeinteger (int32)required
Messagestringrequired
Example response
{
"Code": 0,
"Message": "string"
}