# api v2 error handling API V2 uses following HTTP status codes to indicate success or failures:
**Status code****Explanation**
200 OKSuccess.
400 Bad RequestMissing or invalid request parameters.
401 UnauthorizedAuthorization is required but no API key provided.
403 ForbiddenInvalid API key, no permissions to given resource (e.g. it belongs to another user), resource disabled by administrator.
404 Not FoundResource does not exists.
405 Method Not AllowedResource exists but given method cannot be used on it, e.g. POST to a read-only trading pairs list, using an endpoint that cancels a withdrawal on transaction that is a deposit or internal transfer.
406 Not AcceptableRequest parameters are valid but cannot be accepted, e.g. trying to withdraw coin using valid network, but not associated with given coin, trying to withdraw greater amount than account balance.
409 ConflictThere is a conflict of data that should be unique, e.g. trying to create API key with the same name as existing one.
500 Internal Server ErrorInternal error on the Infinex backend. Please try the request again, preferably with some delay.
504 Gateway TimeoutOne of the backend services received your request but did not respond in any way. The execution status is **unknown** and could have been a failure as good as a success. This should be verified preferably after some time has passed.
511 Network Authentication Required2FA is required. You should repeat the request with identical parameters and 2FA code attached.
For any status except `200`, the response body contains the error payload like this: ```json { "error": { "code": "INTERNAL_SERVER_ERROR", "msg": "Internal server error" } } ``` The `code` field contains an unique, constant error code which can be used to catch the specific error. The `msg` field contains a human-readable error message, which may be updated by Infinex developers without any notice, so it should not be parsed or used for any purposes other than displaying it to the user in unmodified form.