Creates a file.
Additionally, a file can be sent by:
Content-Type
. No
additional properties can be set with the request data.Permitted file types: .jpg
, .png
, .gif
, .pdf
, and .mp3
.
When using a publishable API key, only private files can be created. The files can be modified at a later point or time, or can be accessed using a secret API key.
File created.
Location | string <uri> Location of the related resource. Example: "https://api.rebilly.com/example" |
Unauthorized access. Invalid credentials used.
Access forbidden.
Invalid data sent.
{- "file": "R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=",
- "isPublic": false,
- "name": "logo.png",
- "description": "My file description",
- "sourceType": "upload",
- "tags": [
- "test",
- "tags"
]
}
{- "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
- "name": "string",
- "extension": "string",
- "description": "string",
- "sourceType": "upload",
- "tags": [
- "string"
], - "mime": "image/png",
- "size": 0,
- "width": 0,
- "height": 0,
- "sha1": "string",
- "createdTime": "2019-08-24T14:15:22Z",
- "updatedTime": "2019-08-24T14:15:22Z",
- "isPublic": true,
- "_links": [
- {
- "href": "string",
- "rel": "self"
}
]
}