Skip to content
Docs menu

Copy the text

Your browser did not allow copying. The text below is selected: press Ctrl+C, or ⌘C on a Mac.

Ask for a format

Records the file extension of a format we don't support yet. Only the extension is kept, without the account or the address.

POSThttps://api.switchfile.io/v1/app/format-requests

No API key needed.

Example

curl "https://api.switchfile.io/v1/app/format-requests" \
  -H "Content-Type: application/json" \
  -d '{
    "extension": "heic"
  }'

Request body

  • extensionstringrequired

    File extension of the missing format, like heic

    1 to 20 characters

Responses

  • 202Recorded
    • extensionstringrequired

      Extension as recorded: lower case, without the dot

    202 application/json
    {
      "extension": "heic"
    }
  • 422Invalid data. errors names the fields
    422 application/problem+json
    {
      "type": "https://switchfile.io/docs/api/v1#errors-invalid-data",
      "title": "Invalid data",
      "status": 422,
      "code": "INVALID_DATA",
      "detail": "The request contains invalid data.",
      "errors": {
        "to": [
          "Expected string"
        ]
      }
    }
  • 429Too many requests or a daily quota is used up. See Retry-After
    429 application/problem+json
    {
      "type": "https://switchfile.io/docs/api/v1#errors-rate-limit-exceeded",
      "title": "Rate limit exceeded",
      "status": 429,
      "code": "RATE_LIMIT_EXCEEDED",
      "detail": "Too many requests. Try again in 12 seconds."
    }

Error bodies and codes are explained in Errors.