> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Refresh a fax

> Refreshes the inbound fax's media_url when it has expired



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/real-time-communications/fax.yml post /faxes/{id}/actions/refresh
openapi: 3.1.0
info:
  title: Telnyx Fax API
  version: 2.0.0
  description: API for Fax.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /faxes/{id}/actions/refresh:
    post:
      tags:
        - Programmable Fax Commands
      summary: Refresh a fax
      description: Refreshes the inbound fax's media_url when it has expired
      operationId: RefreshFax
      parameters:
        - name: id
          in: path
          description: The unique identifier of a fax.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          $ref: '#/components/responses/RefreshFaxResponse'
        '404':
          $ref: '#/components/responses/programmable-fax_NotFoundResponse'
        default:
          $ref: '#/components/responses/programmable-fax_GenericErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });


            const response = await
            client.faxes.actions.refresh('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');


            console.log(response.data);
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            response = client.faxes.actions.refresh(
                "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(response.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Faxes.Actions.Refresh(context.TODO(), \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"
        - lang: Java
          source: |-
            package com.telnyx.sdk.example;

            import com.telnyx.sdk.client.TelnyxClient;
            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
            import com.telnyx.sdk.models.faxes.actions.ActionRefreshParams;
            import com.telnyx.sdk.models.faxes.actions.ActionRefreshResponse;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    ActionRefreshResponse response = client.faxes().actions().refresh("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


            telnyx = Telnyx::Client.new(api_key: "My API Key")


            response =
            telnyx.faxes.actions.refresh("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(response)
        - lang: CLI
          source: |-
            telnyx faxes:actions refresh \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
components:
  responses:
    RefreshFaxResponse:
      description: Refresh fax response
      content:
        application/json:
          schema:
            type: object
            title: Refresh Fax Response
            example:
              data:
                result: ok
            properties:
              data:
                type: object
                properties:
                  result:
                    type: string
                    example: ok
    programmable-fax_NotFoundResponse:
      description: The requested resource does not exist
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/programmable-fax_Errors'
          example:
            errors:
              - code: '404'
                title: Not Found
                detail: The requested resource does not exist
    programmable-fax_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/programmable-fax_Errors'
  schemas:
    programmable-fax_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/programmable-fax_Error'
      type: object
    programmable-fax_Error:
      required:
        - code
        - title
      properties:
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
          additionalProperties: true
      type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````