Custom Domain
To receive payments using your domain name, create a CNAME record.
| Name |
Type |
Value |
| pay.yourdomain.com |
CNAME |
t-u-r-b-o.com |
Once the CNAME is ready, you can
add your domain here or use the API.
To remove your existing domain, you can use an empty value
here or via the API.
Parameters
This endpoint has no parameters.
curl \
-X POST \
-H 'Authorization: Bearer TURBO_API_KEY' \
-H 'Content-Type: application/json' \
-d '{ "domain":"your_domain" }' \
https://api.tur.bo/domains/custom
<?php
/*
For this request to work please install guzzlehttp:
curl -sS https://getcomposer.org/installer | php
./composer.phar require guzzlehttp/guzzle:^7.0
*/
require 'vendor/autoload.php';
$api_url ='https://api.tur.bo';
$api_path='/domains/custom';
$api_key ='TURBO_API_KEY';
$opts =[ 'json'=>[ 'domain'=>'example.com' ] ];
$headers =array(
'Authorization'=>'Bearer '.$api_key,
'Content-Type' =>'application/json'
);
try {
$client=new GuzzleHttp\Client( array( 'headers'=> $headers ) );
$json =$client->post(
$api_url.$api_path,
$opts
)->getBody()->getContents();
echo $json;
}
catch( Exception $e ) {
echo 'error = ',$e->getMessage(),"\n";
}
?>
#!/usr/bin/python
import requests
import json
api_url="https://api.tur.bo/domains/custom"
result=requests.post( api_url,json={ 'domain':'your_domain' },headers={'Authorization':'Bearer TURBO_API_KEY','Content-Type':'application/json'} )
print( json.dumps( result.json() ) )
#!/usr/bin/env ruby
require 'uri'
require 'net/http'
require 'net/https'
require 'json'
api_url ="https://api.tur.bo/domains/custom"
api_key ='TURBO_API_KEY'
uri =URI( api_url )
opts ={ 'domain':'your_domain' }
http =Net::HTTP.new( uri.host,uri.port )
http.use_ssl=true
headers ={
'Authorization'=>"Bearer #{api_key}",
'Content-Type' =>'application/json'
}
result=http.post( uri.path,opts.to_json,headers )
puts result.body
{
"error":false,
"msg":"OK"
]}
| JSON response object |
| Key |
Value |
| error |
true or false depending on if an error has occurred in the API request |
| msg |
OK if all is well, otherwise will include descriptive error text |