Update the profile (webhook URL and defaults)
POSThttps://onlinesim.io/api/profile.php
Saves the fields passed in profile and returns the updated account. Fields not passed stay as they are. JSON and form data (profile[webhook_url]=…) both work.
number_region is not used by the service and is always null; a passed value is not stored.
Security
Parameters
query1
| Name | Type | Description |
|---|---|---|
lang | string | Language of the texts in the answer (country and service names, status texts): Enum: frderuenzh |
Request Body
application/jsonschemaobject
profileobjectRequiredFields to change.
Responses
200Saved account, validation errors, or an error code:
ERROR_PARAMS — profile is missing or not an object
Query Exception — the database rejected the change
ERROR_PARAMS — profile is missing or not an objectQuery Exception — the database rejected the changeapplication/jsonschemaoneOf
[0]object
[1]objectValidation errors: field → list of messages; a wrong old_password gives {"old_password": "<message>"}.
[2]object
[3]object
Examples
webhook_url is not a URL
{
"response": {
"webhook_url": [
"The webhook url field must be a valid URL."
]
}
}profile not passed
{
"response": "ERROR_PARAMS"
}429HTTP 429: more than 400 requests per minute from one profile (from one IP for requests without a key), or more than 200 requests per minute from one profile to getNum, getPrice, getState and setOperationOk together
application/jsonschemaobject
Examples
Request rate limit exceeded
{
"response": "TRY_AGAIN_LATER"
}456HTTP 456: the API key is invalid or the OAuth token has expired. Public methods answer the same way when an invalid key is sent
application/jsonschemaobject
Examples
Invalid API key or expired token
{
"response": "ERROR_WRONG_KEY"
}