Skip to content

Create a New Attachment

Method: POST

Url: /Attachments
Header: DPApiAuthenticationToken={YOUR_API_TOKEN}

Query String: None

Request Body:

Parameter NameData TypeRemarks
IncidentID (required)IntegerThe ID of the incident to add an attachment to
FileName (required)StringThe file name for the attachment
FileContentBase64 (required)StringThe file contents in base64 format
ShortDescriptionStringThe description for the attachment

Default: Empty String
CreatedByContactIDIntegerThe ID of the contact who added the attachment

Default: -1
CustomFieldsList<CustomField>List of custom fields (key-value pair) for this record
Request Example:
POST “https://api.dataprise.com/api/v1/Attachments/”Header: “DPApiAuthenticationToken=abcxyz0123456789″Body: { “IncidentID”: 4321, “FileName”: “TestApi.jpg”, “ShortDescription”: “Test upload from API”, “FileContentBase64”: “/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAIBAQIBAQICAgICAgICAwUDAwMDAwYEBAMFBwYHBwcGBwcICQsJCAgKCAcHCg0KCgsMDAwMBwkODw0MDgsMDAz/2wBDAQICAgMDAwYDAwYMCAcIDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAz/wAARCABkAGQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD5Pooor/RA+DCiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigArS8PeHo9dt9Tkk1PTdNGm2bXYF27hrxg6IIYgqsWkJfIBwAFYlgATWbRUyTasnYYUUUVQgooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigD//2Q==”, “CustomFields”: [{“FieldLabel”: “Source”, “FieldValue”:”Email”}] }

Response:

The API will return the response as under:

PropertyData TypeRemarks
StatusStringStatus of the request. Either “Success” or “Failure”
MessageStringError messages if the request failed (i.e. Status = “Failure”)
IdIntegerThe ID of the created record if the request succeeded (i.e. Status = “Success”)
Sample Response:
{ “Status”: “Success”, “Message”: “”, “Id”: 4348 }