Create a New Attachment

Method: POST

Url: /Attachments
Header: DPApiAuthenticationToken={YOUR_API_TOKEN}

Query String: None

Request Body:

Parameter Name Data Type Remarks
Parameter Name:

IncidentID (required)

Data Type:

Integer

Description:

The ID of the incident to add an attachment to

Parameter Name:

FileName (required)

Data Type:

String

Description:

The file name for the attachment

Parameter Name:

FileContentBase64 (required)

Data Type:

String

Description:

The file contents in base64 format

Parameter Name:

ShortDescription

Data Type:

String

Description:

The description for the attachment

Default: Empty String

Parameter Name:

CreatedByContactID

Data Type:

Integer

Description:

The ID of the contact who added the attachment

Default: -1

Column Name:

CustomFields

Data Type:

List<CustomField>

Remarks:

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:

Property Data Type Remarks
Parameter Name:

Status

Data Type:

String

Description:

Status of the request. Either "Success" or "Failure"

Parameter Name:

Message

Data Type:

String

Description:

Error messages if the request failed (i.e. Status = "Failure")

Property:

Id

Data Type:

Integer

Description:

The ID of the created record if the request succeeded (i.e. Status = "Success")

Sample Response:
		{
			"Status": "Success",
			"Message": "",
			"Id": 4348
		}