---
title: "POST /workorders/attachmentAsBase64"
method: POST
path: "/workorders/attachmentAsBase64"
tags: ["Attachments"]
---

# POST /workorders/attachmentAsBase64

`POST /workorders/attachmentAsBase64`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/workorders/attachmentAsBase64`
- Auth: OAuth 2
  - Authorization code: `https://sb2login.servicechannel.com/oauth/authorize`
  - Token URL: `https://sb2login.servicechannel.com/oauth/token`
- TypeScript: <https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/docs/workorders/attachmentAsBase64/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- ServiceChannelServicesMessagingAttachmentsAddBase64AttachmentsRequest
  - `poNumber` string: Purchase Order. Required.
  - `file` string: File as a base64 encoded value.
  - `fileName` string: File name with extension. Optional. GUID value by default.
  - `extension` string: File extension. Ignored if fileName is passed. Optional.
  - `description` string: Description for file. Optional.
  - `actor` string: Name of the person on whose behalf you are performing the action. Optional.
  - `isInvoiceDigitalCopy` boolean: Mark attachment as Invoice Digital Copy

## Response `201`

Created indicates that the request resulted in a new resource created before the response was sent.

## Other responses

- `400`: Bad Request - the request could not be understood or was missing required parameters. <br/>Error codes: <br/> 502 - Work Order not found; <br/> 503 - Only for subscribers usage; <br/> 920 - Purchase number cannot be empty; <br/> 946 - Work Order attachments size exceeded; <br/> 9100 - There are multiple work orders with the same PO number;
- `401`: Indicates that the requested resource requires authentication. <br/>Error codes: <br/> 504 - API call rejected by security permissions;
- `500`: Indicates that a generic error has occurred on the server.

---

[API](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3.md) - [All operations](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/llms.txt) - [OpenAPI document](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/revisions/d490d6596809?raw)
