---
title: "Attach resource"
method: POST
path: "/resource_attach_url_path_placeholder"
tags: ["Lookups"]
---

# Attach resource

`POST /resource_attach_url_path_placeholder`

## Request

- Base URL: `{siteUrl}`
- URL: `{siteUrl}/resource_attach_url_path_placeholder`
- Auth: none declared

_Note: The path is a placeholder. The actual path is determined by the configuration of the app component._

When the user attaches a resource URL to a task, Asana will make a signed request to the specified `resource_attach_url` in the app configuration. Information about the attached resource should be included in the response.

## Request body

- AttachResourceRequest: The body of an attach request.
  - `expires_at` string: The time (in ISO 8601 date format) when the request should expire.
  - `user` string: The user GID this hook is coming from.
  - `workspace` string: The workspace GID this hook is coming from.
  - `task` string: The task GID this hook is coming from.
  - `attachment` string: The attachment ID of the URL attachment
  - `query` string: The user’s input in the lookup text input. This is often a resource URL or resource key, such as `"CP-1"` or `"https://abcde.atlassian.net/browse/CP-1"`

## Response `200`

Successfully attached the resource to the given object.

- AttachedResourceResponse: The response to a successful lookup request.
  - `resource_name` string, required: The name of the attached resource
  - `resource_url` string, required: The URL of the attached resource
  - `error` string: The error that should be displayed to the user

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `500`: Server error

---

[API](https://skmtc.dev/asana/apis/app-components.md) - [All operations](https://skmtc.dev/asana/apis/app-components/llms.txt) - [OpenAPI document](https://skmtc.dev/asana/apis/app-components/revisions/bbebcce5c9f6?raw)
