URL for a request
Method
GET
Incoming Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_token | string | Yes | API token for access |
| url | string | Yes | Valid link with http or https |
| type | string | Yes | The type of link. Possible options:
|
| redirect_type | int | Yes | Redirect type:
|
| link_name | string | No | Link name |
| keywords | string | No | Keywords for link search |
| keywords_mode | int | No | Keyword search logic: 1 - any word, 2 - half of the words, 3 - all the words from the query must be taken into account |
| domain_id | int | No | The ID of your domain, which can be obtained from the Domains page. You can also get through the method List of domains |
| sub_domain | string | No | You can create a subdomain, or specify an existing one. For some domains, you can only add links on subdomains. Only latin characters and numbers. |
| code | string | No | The link code. Must be unique. The Latin alphabet, numbers and underscores are allowed. |
| group_id | int | No | Link group ID |
| options | string | No | A string with a list of additional settings |
Return values
The server returns a response in JSON format. The list of parameters depends on the server response code:
Request example
curl 'https://firelinks.cc/api/out/links/create?api_token=W9DtD7JtyHI7nPj8eEWul2pVkcobE62IHaHi3n8ClQdogBGZe6n70fIgTH3u&url=http%3A%2F%2Fgoogle.com&type=url&&redirect_type=0&monetization=1&link_name=API%20test&keywords=one%2Ctwo%2Cthree&code=Test_code_1&keywords_mode=1'
Response example 200
{
"success": true,
"id": 412,
"url": "https://firelinks.cc/Test_code_1",
"qr": "https://firelinks.cc/qr.png",
"title": "Google",
"description": null
}
Response example 422
{
"success": false,
"errors": "Validation errors",
"data": {
"code": [
"This link code is already occupied"
]
}
}