Creates a new file link object.
Parameters
- filestringRequired
The ID of the file. The file’s
purposemust be one of the following:business_,icon business_,logo customer_,signature dispute_,evidence finance_,report_ run financial_,account_ statement identity_,document_ downloadable issuing_,regulatory_ reporting pci_,document selfie,sigma_,scheduled_ query tax_,document_ user_ upload terminal_, orandroid_ apk terminal_.reader_ splashscreen - expires_
attimestamp The link isn’t usable after this future timestamp.
- metadatamap
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to
metadata.
Returns
Returns the file link object if successful and raises an error otherwise.
curl https://api.stripe.com/v1/file_links \ -u "sk_test_...sk_test_...:" \ -H "Stripe-Version: 2026-10-28.endive" \ -d file={{FILE_ID}}{ "id": "link_1Mr23jLkdIwHu7ix65betcoo", "object": "file_link", "created": 1680108075, "expired": false, "expires_at": null, "file": "file_1Mr23iLkdIwHu7ixQkCV3CBR", "livemode": false, "metadata": {}, "url": "https://files.stripe.com/links/MDB8YWNjdF8xTTJKVGtMa2RJd0h1N2l4fGZsX3Rlc3RfaXVoY2hrUnJPMzlBR3dPb01XMmFkSTVq00yUPLFf3h"}Updates an existing file link object. Expired links can no longer be updated.
Parameters
- idstringRequired
Unique identifier for the object.
- expires_
atstring, value is "now" | timestamp A future timestamp after which the link will no longer be usable, or
nowto expire the link immediately. - metadatamap
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to
metadata.
Returns
Returns the file link object if successful, and raises an error otherwise.
curl https://api.stripe.com/v1/file_links/{{FILE_LINK_ID}} \ -u "sk_test_...sk_test_...:" \ -H "Stripe-Version: 2026-10-28.endive" \ -d "metadata[order_id]=6735"{ "id": "link_1Mr23jLkdIwHu7ix65betcoo", "object": "file_link", "created": 1680108075, "expired": false, "expires_at": null, "file": "file_1Mr23iLkdIwHu7ixQkCV3CBR", "livemode": false, "metadata": { "order_id": "6735" }, "url": "https://files.stripe.com/links/MDB8YWNjdF8xTTJKVGtMa2RJd0h1N2l4fGZsX3Rlc3RfaXVoY2hrUnJPMzlBR3dPb01XMmFkSTVq00yUPLFf3h"}Retrieves the file link with the given ID.
Parameters
- idstringRequired
Unique identifier for the object.
Returns
If the identifier you provide is valid, a file link object returns. If not, Stripe raises an error.
curl https://api.stripe.com/v1/file_links/{{FILE_LINK_ID}} \ -u "sk_test_...sk_test_...:" \ -H "Stripe-Version: 2026-10-28.endive"{ "id": "link_1Mr23jLkdIwHu7ix65betcoo", "object": "file_link", "created": 1680108075, "expired": false, "expires_at": null, "file": "file_1Mr23iLkdIwHu7ixQkCV3CBR", "livemode": false, "metadata": {}, "url": "https://files.stripe.com/links/MDB8YWNjdF8xTTJKVGtMa2RJd0h1N2l4fGZsX3Rlc3RfaXVoY2hrUnJPMzlBR3dPb01XMmFkSTVq00yUPLFf3h"}